[SVM] Return the shadow EFER value on guest EFER reads.
authorTravis Betak <travis.betak@amd.com>
Mon, 5 Mar 2007 22:18:10 +0000 (16:18 -0600)
committerTravis Betak <travis.betak@amd.com>
Mon, 5 Mar 2007 22:18:10 +0000 (16:18 -0600)
Return the shadow of the guest's EFER instead of the VMCB.  This helps
with things such as the unlikely event the guest wants to check EFER.LME
immediately after setting it (The VMCB's EFER.LME remains clear until
the guest enables paging).

Signed-off-by: Travis Betak <travis.betak@amd.com>
xen/arch/x86/hvm/svm/svm.c

index f0baf1c1cdd241bb79171cba26d50af7bffeae9e..01064e21e3be37733816ed38d1feb5e9149aad8a 100644 (file)
@@ -187,8 +187,7 @@ static inline int long_mode_do_msr_read(struct cpu_user_regs *regs)
     switch ((u32)regs->ecx)
     {
     case MSR_EFER:
-        msr_content = vmcb->efer;
-        msr_content &= ~EFER_SVME;
+        msr_content = v->arch.hvm_svm.cpu_shadow_efer;
         break;
 
 #ifdef __x86_64__